package com.itheima.继承的好处_01;

    /*
    继承的好处
        解决了类与类之间代码重复使用的问题,降低冗余,提高代码复用性
     */
public class Demo01 {
        public static void main(String[] args) {
            Son01 son01 = new Son01();
            Son02 son02 = new Son02();
            son01.print();
            System.out.println("====================");
            son02.print();
        }
}

class Father{
    public void print(){
        System.out.println("HelloWorld");
        System.out.println("HelloJava");
        System.out.println("HelloJavaSE");
        System.out.println("Wait Me,JavaEE");
    }
}

class Son01 extends Father{
}


class Son02 extends Father{
}